package com.aliyun.messagemgt.application.service.Impl;

import com.aliyun.messagemgt.application.service.BaseMessageSourceService;
import com.aliyun.messagemgt.domain.repository.BaseMessageSourceRepository;
import com.aliyun.messagemgt.dto.BaseMessageSourceDto;
import com.aliyun.messagemgt.dto.base.BaseMessageSourceDTO;
import com.aliyun.messagemgt.dto.query.BaseMessageSourceQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author yangshaobo
 * @date 2021年10月14日
 */
@Service
public class BaseMessageSourceServiceImpl implements BaseMessageSourceService {

    @Autowired
    private BaseMessageSourceRepository baseMessageSourceRepository;


    @Override
    public Object listBaseMsgSource(BaseMessageSourceQuery baseMessageSourceQuery) {
        return baseMessageSourceRepository.listBaseMsgSource(baseMessageSourceQuery);
    }

    @Override
    public Object isEnabled(BaseMessageSourceDto baseMessageSourceDto) {
        return baseMessageSourceRepository.isEnabled(baseMessageSourceDto);
    }

    @Override
    public Object queryLog(BaseMessageSourceQuery messageSourceQuery) {
        return baseMessageSourceRepository.queryLog(messageSourceQuery);
    }

    @Override
    public BaseMessageSourceDTO getByTenantCodeAndSceneCode(String tenantCode, String sceneCode) {
        return baseMessageSourceRepository.getByTenantCodeAndSceneCode(tenantCode,sceneCode);
    }
}
